package com.qth.valet.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qth.valet.common.utils.ResponseResult;
import com.qth.valet.entity.po.CouponUser;
import com.qth.valet.entity.vo.CouponUserVo;
import com.qth.valet.mapper.CouponUserMapper;
import com.qth.valet.service.CouponUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * @author 蔡徐坤
 * @since 2025-08-26
 */
@Service
@RequiredArgsConstructor
public class CouponUserServiceImpl extends ServiceImpl<CouponUserMapper, CouponUser> implements CouponUserService {

    private final CouponUserMapper couponUserMapper;

    @Override
    public List<CouponUserVo> getMyCouponList(Integer id) {
        return couponUserMapper.getMyCouponList(id);
    }

    @Override
    public Long getMyCouponCount(Integer id) {
        return couponUserMapper.getMyCouponCount(id);
    }

    @Override
    public IPage<CouponUserVo> getMyCouponBySts(IPage<CouponUserVo> page, Integer id, Integer status) {
        return couponUserMapper.getMyCouponBySts(page, id, status);
    }
}
